#include <stdio.h>
/*
结构体指针
*/
typedef struct str
{
    int id;
    int age;
    int soc;
}str , *ptr_1;

/*
struct str * ptr_1
*/

int main(int argc, char const *argv[])
{
    int num = 50;
    int * ptr = &num;

    // 结构体指针 声明
    str s1 = { .age = 18 , .id = 60};
    str * ptr_s1 = &s1;

    // 结构体指针的访问
    printf("%d %d \n" , s1.age , s1.id);
    printf("%d %d \n" , ptr_s1->age , ptr_s1->id);

    // 会产生问题的点  段错误 (核心已转储)
    ptr_s1 = &s1;
    printf("%d %d \n" , ptr_s1->age , ptr_s1->id);


    ptr_1 pre_5 = &s1;
    

    return 0;
}





